package vip.xiaonuo.bi.core.datasource.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import vip.xiaonuo.bi.core.datasource.config.ExtendParamConfig;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 数据库连接配置抽象类 供具体数据源实现继承
 *    @author 顾育司
 *    @date  2023/12/15 12:09
 */
@Data
@ToString
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public abstract class  AbstractDataSourceConfig  implements DataSourceConfig{

    /**
     * 二期考虑使用redis等替换存储
     */
    private  final Map<String,Object> dataSourceConfigCahce = new ConcurrentHashMap<>();
    /* 关系型数据库具体类型 如mysql orancle等*/
    protected Integer sourceType;
    protected String sourceId;
    public ExtendParamConfig extendParamConfig;
    private Map<String, Object> kerberosConfig;

    @Override
    public <T> T getConfig(String key, Class<T> type) {
        return null;
    }

    @Override
    public <T> T getConfig(String key, Class<T> type, T defaultValue) {
        return null;
    }




}
